<div class="modal-header">
	<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
	<h4 class="modal-title">Pedido: {{ $order->order_number }}</h4>
</div>
<div class="modal-body">
	<dl class="dl-horizontal">
  		<dt>Nro Pedido:</dt>
  		<dd>{{ $order->order_number }}</dd>
  		<dt>Cliente:</dt>
  		<dd>{{ $order->customer->name }}</dd>
  		<dt>Entrada:</dt>
  		<dd>{{ $order->order_date->format('d/m/Y') }}</dd>
  		<dt>Início da Produção:</dt>
  		<dd>{{ $order->production_start_date->format('d/m/Y') }}</dd>
  		<dt>Data de Entrega:</dt>
  		<dd>{{ $order->production_end_date->format('d/m/Y') }}</dd>
	</dl>
	
	<table class="table table-condensed">
		<thead>
			<tr>
				<th>Componente</th>
				<th>Centro de Custo Atual</th>
				<th>Situação</th>
			</tr>
		</thead>
		<tbody>
			@foreach($components as $item)
				@if ($item->status === 'late')
					<tr class="danger">
				@elseif ($item->status === 'onSchedule')
					<tr class="success">
				@elseif ($item->status === 'aheadSchedule')
					<tr class="info">
				@elseif ($item->status === 'finished')
					<tr>
				@endif
				<td>{{ $item->component_name }}</td>
				<td>
					@if (empty($item->actual_costs_centre_name))
						Concluído
					@else
						{{ $item->actual_costs_centre_name }}
					@endif
				</td>
				
				<td>
					@if ($item->status === 'late')
						Atrasado
					@elseif ($item->status === 'onSchedule')
						Em dia
					@elseif ($item->status === 'aheadSchedule')
						Adiantado
					@elseif ($item->status === 'finished')
						Concluído
					@endif
				</td>
			</tr>
			@endforeach
		</tbody>
	</table>
</div>
<div class="modal-footer">
	<button type="button" class="btn btn-default" data-dismiss="modal">Fechar</button>
</div>